import { CommonType } from '@/common/dto/common.type';
import { CourseType } from '@/modules/course/dto/course.type';
import { Field, ObjectType } from '@nestjs/graphql';

@ObjectType()
export class CardType extends CommonType {
  @Field({
    description: '名字',
  })
  name: string;

  @Field({
    description: `卡类型
    TIME = "time",
    DURATION = "duration"`,
  })
  type: string;

  @Field({
    description: '上课次数',
    nullable: true,
  })
  time: number;

  @Field({
    description: '有效期 (天)',
    nullable: true,
  })
  validityDay: number;

  @Field(() => CourseType, {
    description: '课程',
  })
  course: CourseType;
}
